package com.ly.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.time.LocalDateTime;
@Data
public class User {
    @NotNull
    private Integer id; // 用户id
    @NotNull
    private String username; // 用户名
    @JsonIgnore //这样密码就查不到，不显示出来
    private String password; // 密码
    @NotEmpty
    @Pattern(regexp = "^\\S{5,16}$")
    private String nickname; // 昵称
    @NotEmpty
    @Email
    private String email; // 邮箱
    private String userPic;  // 头像地址
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
}
